-
Notifications
You must be signed in to change notification settings - Fork 105
feat: Add pluggable A2AHttpClient with Vert.x implementation #584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @ehsavoie, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the HTTP client capabilities by introducing a pluggable architecture. It allows the system to dynamically select the most performant HTTP client available, with a new Vert.x-based client offering high-performance asynchronous operations, while retaining the JDK client as a reliable default. This change provides greater flexibility and potential for performance improvements without requiring explicit configuration from the end-user. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
@brasseld It has been quite some time but if you want to take a look at this PR :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a pluggable HTTP client architecture using Java's ServiceLoader, with a new Vert.x implementation and a JDK fallback. The changes are well-integrated across the codebase, updating dependencies, imports, and client instantiation to leverage the new A2AHttpClientFactory. The new Vert.x client and its provider are well-documented and include comprehensive tests. The overall design significantly improves flexibility by allowing users to choose or provide their preferred HTTP client implementation.
http-client-vertx/src/main/java/io/a2a/client/http/VertxA2AHttpClient.java
Outdated
Show resolved
Hide resolved
http-client-vertx/src/main/java/io/a2a/client/http/VertxA2AHttpClient.java
Outdated
Show resolved
Hide resolved
http-client-vertx/src/main/java/io/a2a/client/http/VertxA2AHttpClient.java
Outdated
Show resolved
Hide resolved
http-client-vertx/src/main/java/io/a2a/client/http/VertxA2AHttpClientProvider.java
Outdated
Show resolved
Hide resolved
bf5b44b to
ed6d055
Compare
a28dae0 to
7a778c8
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a pluggable A2AHttpClient architecture using Java's ServiceLoader, which is a great improvement for flexibility. The new Vert.x-based implementation is a valuable addition for high-performance scenarios. The code is well-structured, and the changes are consistently applied across the modules. The inclusion of comprehensive tests for the new implementation is also commendable. I've found a critical bug in RestTransportProvider.java that could lead to a NullPointerException, and a few minor areas for improvement in the new VertxA2AHttpClient implementation for code clarity and correctness. Overall, this is a solid contribution.
client/transport/rest/src/main/java/io/a2a/client/transport/rest/RestTransportProvider.java
Show resolved
Hide resolved
extras/http-client-vertx/src/main/java/io/a2a/client/http/VertxA2AHttpClient.java
Show resolved
Hide resolved
extras/http-client-vertx/src/main/java/io/a2a/client/http/VertxA2AHttpClient.java
Outdated
Show resolved
Hide resolved
extras/http-client-vertx/src/main/java/io/a2a/client/http/VertxA2AHttpClient.java
Show resolved
Hide resolved
extras/http-client-vertx/src/main/java/io/a2a/client/http/VertxA2AHttpClient.java
Show resolved
Hide resolved
|
Hey @ehsavoie , thanks for adding me here, it's been a while indeed. Some general comments:
Good work in general, I will be giving it a try later today (US TZ). |
|
@brasseld : |
Introduce ServiceLoader-based A2AHttpClient client architecture with two implementations: - JDK HttpClient (core, always available) - Vert.x WebClient (optional, high-performance) Changes: - Create http-client-vertx module for Vert.x implementation - Add ServiceLoader infrastructure (A2AHttpClientFactory, providers) - Update dependent modules to use Vert.x client by default - Add comprehensive tests and usage examples Users can choose implementation via Maven dependencies. Priority-based selection: Vert.x (100) > JDK (0). Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
jmesnil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Sounds good. Should the extras README be updated as well maybe ? https://github.com/a2aproject/a2a-java/blob/main/extras/README.md |
Introduce ServiceLoader-based A2AHttpClient client architecture with two implementations:
Changes:
Users can choose implementation via Maven dependencies. Priority-based selection: Vert.x (100) > JDK (0).
Fixes #583 🦕